package com.imooc.demo.springboot.es.entity.mysql;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by hu on 2019/12/17.
 * CREATE TABLE `t_blog` (
 `id` int(10) unsigned NOT NULL auto_increment COMMENT '自增id',
 `title` varchar(60) default NULL COMMENT '博客标题',
 `author` varchar(60) default NULL COMMENT '博客作者',
 `content` mediumtext COMMENT '博客内容',
 `create_time` timestamp NULL default NULL COMMENT '创建时间',
 `update_time` timestamp NULL default NULL COMMENT '修改时间',
 PRIMARY KEY  (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 */
@Data
@Table(name = "t_blog")
@Entity
public class MysqlBlog {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String title;
    private String author;
    @Column(columnDefinition = "mediumtext")
    private String content;
    private Date createTime;
    private Date updateTime;
}
